<div class='fui-page fui-page-current member-log-page'>
	<div class="fui-header">
        <div class="fui-header-left">
            <a class="back" ng-click='goback()'></a>
        </div>
        <div class="title">配送记录</div>
    </div>
    <div class='fui-content'>
		<div class="fui-tab fui-tab-success">
			<a ng-class="{'active':pagedata.params.type==1}" class="external" href="javascript:;" ng-click="pagedata.params.type=1;tool.get_list('/merch.sendlog/list/',true)">配送上门</a>
			<a ng-class="{'active':pagedata.params.type==2}" class="external" href="javascript:;" ng-click="pagedata.params.type=2;tool.get_list('/merch.sendlog/list/',true)">上门自提</a>
		</div>
		<div class="fui-tab fui-tab-success">
			<a ng-class="{'active':pagedata.params.status==0}" class="external" href="javascript:;" ng-click="pagedata.params.status=0;tool.get_list('/merch.sendlog/list/',true)">今日配送</a>
			<a ng-class="{'active':pagedata.params.status==1}" class="external" href="javascript:;" ng-click="pagedata.params.status=1;tool.get_list('/merch.sendlog/list/',true)">配送中</a>
			<a ng-class="{'active':pagedata.params.status==2}" class="external" href="javascript:;" ng-click="pagedata.params.status=2;tool.get_list('/merch.sendlog/list/',true)">已完成</a>
			<a ng-class="{'active':pagedata.params.status=='other'}" class="external" href="javascript:;" ng-click="pagedata.params.status='other';tool.get_list('/merch.sendlog/list/',true)">待配送</a>
			<a ng-class="{'active':pagedata.params.status==7}" class="external" href="javascript:;" ng-click="pagedata.params.status=7;tool.get_list('/merch.sendlog/list/',true)">异常单</a>
		</div>
        <div class='content-empty' ng-show="!pagedata.list || pagedata.list.length<=0">
            <i class='fa fa-comment-o'></i><br/>暂时没有任何配送单!
        </div>
		<div style="padding:0 0.5rem">
        <div ng-repeat="item in pagedata.list" class='fui-cell-group' ng-show="pagedata.list.length>0" >
			<div class="fui-cell">
				<div class="fui-cell-info">
					<div class='title'>
						<span ng-show="item.sendtype==1" class="label label-success">配送上门</span> 
						<span ng-show="item.sendtype!=1" class="label label-danger">上门自提</span>
						<span>({{item.week}})</span>
						<span class="red">(配送费:￥{{item.get_money}})</span>
					</div>
				</div>
				<div class='fui-cell-remark noremark'>
					<span class='fui-label fui-label-default gray' style="background:#f2f2f2;border-radius:0.2rem;">{{item.statustitle}}</span>
				</div>
			</div>
			<div class="fui-cell">
				<div class="fui-cell-text" style="line-height:1.8">
					<div ng-if="item.peimember.title">
						 <span class="text">
							 配送员：{{item.peimember.title}}
						</span>
						<span class="text" href="tel:{{item.peimember.mobile}}" style="padding-left:1rem;color:#00c568">
							 电话：{{item.peimember.mobile}}
						</span>
					</div>
					<div ng-if="item.day" class="red">{{item.sendtype==2?'自提':'配送'}}时间:{{item.day}}</div>
					<div style="line-height:1.4;color:#999;font-size:0.65rem"><i class="icon icon-wo1"></i> 联系人： <span class="text-danger" style="padding-right:0.5rem">{{item.order_out.realname || item.order_out.name}}  </span> 联系电话： <a href="tel:{{item.order_out.mobile}}" class="text-danger">{{item.order_out.mobile}}</a></div>
					<div style="line-height:1.4;color:#999;font-size:0.65rem"><i class="icon icon-ditu"></i>  配送地址： <span class="text-danger">{{item.order_out.pcd.city}} {{item.order_out.pcd.district}} {{item.order_out.pcd.street}} {{item.order_out.address}} </span> <a href="javascript:" ng-click="pagedata.openLocation(item.order_out);" class="btn btn-sm btn-danger-o" style="font-size:0.65rem;line-height: 1.5;"><i class="icon icon-lvyoutehui"></i>导航</a></div>
				</div>
			</div>
			<div class="fui-cellone" ng-repeat="g in item.goods" ng-if="g.num>0" style="padding:0.3rem 0.5rem">
							<div class="fui-cellone-info">
								{{g.title}}
							</div>
							<div ng-if="g.selespename" class="fui-cellone-info" style="color:red">
								{{g.selespename}}
							</div>
							<div class="fui-cellone-remark noremark">
								{{g.num}}件
							</div>
			</div>
			<div class="right" style="padding:0.3rem 0.5rem">
				<span ng-if="item.status==1 && false">
						<div class="btn btn-sm btn-success-o order-finish" style="font-size:0.7rem" href="javascript:" ng-click="post({},'/merch.sendlog/dingpei2/id='+item.id);">完成本次配送</div>
				</span>
			</div>
			</div>
		</div>
    </div>
	<div ng-include="sys_html('_footer')"></div>
</div>

<script>
scope.tool.get_list('/merch.sendlog/list/',true);
scope.pagedata.scroll_bottom=function(){
	scope.tool.get_list('/merch.sendlog/list/');
}
</script>